import {GRADE} from '@/services/api'
import {request, METHOD} from '@/utils/request'

export async function listGradeByPage(currentPage, size) {
    return request(GRADE, METHOD.GET, {
        currentPage: currentPage,
        size: size
    })
}

export async function totalGrade() {
    return request(GRADE+"/total", METHOD.GET)
}

export async function deleteGrade(id) {
    return request(GRADE, METHOD.DELETE, {
        id: id
    })
}

export async function editGrade(id, grade) {
    return request(GRADE, METHOD.POST, {
        id: id,
        grade: grade
    })
}
